package sumsquares_squaresum_prob6;

public class Sumsquares {

	public static void main(String args[]){
		//sum of squares
		int sumsquares = 0;
		int squaresums = 0;
		
		for(int i = 1; i <= 100;i++){
			sumsquares = (i*i) + sumsquares;
			//System.out.println("Num: " + i + ". Adding: " + (i*i) + ". Total: " + sumsquares);
		}
		
		//Square sums
		for(int i = 1; i <= 100; i++){
			squaresums = squaresums + i;
		}
		
		squaresums = squaresums*squaresums;
		
		int ans = squaresums - sumsquares;
		
		System.out.println("Ans is: " + ans);
		
	}
}
